<template>
    <div class="content">
        	<div class="spare-a">
			
			<form name="form" method="post" id="editForm" @submit.prevent="submit" >
            <div class="save-bg"><a href="#" class="spare-tj" @click="submit()">保 存</a></div>
			<div class="spare-add" >
				<input type="hidden"  v-model="marker.id"/>
                <input type="hidden"  v-model="marker.checked"/>
				<!--<input type="hidden" :value="this.$route.params.row.checked" name="checked"/>
			 	<input type="hidden" name="dmodelId" th:value="*{dmodelId}"/>
				<input type="hidden" name="projectId" th:value="*{projectId}"/> -->
				<ul>
					<li>
						<div class="spare-addl">数据模块：</div>
						<div class="spare-addr"><input type="text"  v-model="marker.code" readonly="readonly" class="spare-add-input" ></div>
					</li>
					<li>
						<div class="spare-addl">书签名：</div>
						<div class="spare-addr"><input type="text" class="spare-add-input" v-model="marker.title" /></div>
					</li>
				</ul>
			</div>
			</form>
		</div>
    </div>
</template>
<script>
export default {
    data(){
        return{
            marker:{                
            }
        }
    },
    methods:{
        getDatas(){
               this.axios
                .get("/ietm/findById", {
                params: {
                    id: this.$route.params.row.id
                }
                })
                .then(res => {
                    console.log(res)
                this.marker = res.data;
                });
        },
        submit(){
            var that = this
            console.log(this.marker)
            this.postRequest('/ietm/saveMarker',this.marker).then(function (response) {
                        that.$router.push({path:'/record/tag'})
                    })
                    .catch(function (error) {
                        console.log(error);
                    }); 
           /*  this.axios.post('/ietm/saveMarker', this.$qs.stringify(this.marker
            ), {headers:{'Content-Type':'application/x-www-form-urlencoded'}}
            )
                    .then(function (response) {
                        console.log(response);
                    })
                    .catch(function (error) {
                        console.log(error);
                    }); */

           // let postData = this.$qs.stringify(this.marker);
         /*   let postData = this.$qs.stringify(
               {id:this.marker.id,
                code:this.marker.code}
               );
                    this.axios.post('/ietm/saveMarker',{
                        data:postData
                    }).then((res)=>{
                        alert(111)
                    }); */
           /*  this.axios
                .post("/ietm/saveMarker", {
                params: {id:this.marker.id,
                }
                })
                .then(res => {
                    alert('成功')

                }); */
        }
    },
    created(){
        this.getDatas()
    }
}
</script>

<style scoped>
@import url("../../../assets/css/content.css");
@import url("../../../assets/css/animation.css");
</style>
